<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--#include virtual="users.inc.asp"-->
<title>无标题文档</title>
</head>

<body>
<%
if request.Form("username")="" or request.Form("password")="" then
%>
<form id="form1" name="form1" method="post" action="reg.asp">
	<label for="username">登录名（邮箱）</label>
	<input type="text" name="username" id="username" />
	<label for="password">密码（不要用邮箱密码）</label>
	<input type="password" name="password" id="password" />
	<input type="submit" name="submit" id="submit" value="注册" />
</form>
<%
else
	set conn=server.createobject("adodb.connection")
	conn.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("App_Data\MainDB.mdb")
	set rs=server.createobject("adodb.recordset")
	rs.open "SELECT * FROM [Users]",conn,3,3
	rs.addnew
	rs("UserName")=request.Form("username")
	rs("PWD")=request.Form("password")
	rs.update
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	response.Write("注册成功，<a href=""default.asp"">返回首页</a>")
end if
%>
</body>
</html>
